<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>拜托了，AI！</title>
    <link href="./js/layui/css/layui.css" rel="stylesheet">
    <style>
        body {
            overflow-y: hidden;
        }

        .header {
            background-image: url("./static/please.jpg");
            background-size: auto 100%;
            background-repeat: no-repeat;
            height: 200px;
            background-position-x: center;
        }

        .header .title {
            width: 100%;
            text-align: center;
            font-size: xxx-large;
            font-weight: bolder;
            text-shadow: -1px -1px 0 #fff, 1px 1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
        }

        .subtitle {
            margin-top: 10px;
            margin-bottom: 10px;
            text-align: center;
        }

        .list {
            height: calc(100vh - 360px);
        }


        .message {
            padding: 20px;
            background-color: #ededed;
        }

        .message .send {
            width: 100%;
            height: 100px;
        }

        .message_common {
            border-radius: 10px;
            padding: 5px 10px 5px 10px;
            margin-top: 10px;
        }

        .message_me {
            float: right;
            background: #86ef64;
        }

        .message_chat {
            float: left;
            background: white;
        }
    </style>
</head>
<body>
<div class="layui-row">
    <div class="layui-col-xs3">
        <div class="subtitle">讯飞——语音听写</div>
        <form class="layui-form" lay-filter="iat-filter">
            <div class="layui-form-item">
                <label class="layui-form-label">APPID</label>
                <div class="layui-input-block">
                    <input type="text" name="iat_appid" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">API_SECRET</label>
                <div class="layui-input-block">
                    <input type="text" name="iat_app_secret" lay-verify="required" placeholder="请输入"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">API_KEY</label>
                <div class="layui-input-block">
                    <input type="text" name="iat_app_key" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </form>
    </div>
    <div class="layui-col-xs6">
        <div class="header">
            <div class="title">拜托了，AI！</div>
        </div>
    </div>
    <div class="layui-col-xs3">
        <div class="subtitle">讯飞——星火大模型</div>
        <form class="layui-form" lay-filter="chat-filter">
            <div class="layui-form-item">
                <label class="layui-form-label">APPID</label>
                <div class="layui-input-block">
                    <input type="text" name="chat_appid" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">API_SECRET</label>
                <div class="layui-input-block">
                    <input type="text" name="chat_app_secret" lay-verify="required" placeholder="请输入"
                           autocomplete="off"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">API_KEY</label>
                <div class="layui-input-block">
                    <input type="text" name="chat_app_key" lay-verify="required" placeholder="请输入" autocomplete="off"
                           class="layui-input">
                </div>
            </div>
        </form>
    </div>
</div>
<div class="layui-row">
    <div class="layui-col-xs12" style="text-align: center;color: red;">
        键盘“左箭头”按钮开始听写，键盘“右箭头”按钮发送给AI
    </div>
</div>
<div class="layui-row list" style="overflow-y: auto;" id="box">
    <div class="layui-col-xs12" style="padding: 0 20px;display: grid;" id="chat_box">
    </div>
</div>
<div class="layui-row message">
    <div class="layui-col-xs2" style="text-align: center;">
        <div style="width: 100%;height: 100px;border: 1px solid #dddddd;">
            <i class="layui-icon layui-icon-mike"
               style="font-size: 30px; color: #1E9FFF;top: 10px;position: relative;"></i>
            <div style="position: relative;top: 20px;">
                <button id="btn_control" class="layui-btn layui-btn-primary layui-border-green">
                    <i class="layui-icon layui-icon-left" style="font-size: 20px; color: #16baaa;"></i>开始听写
                </button>
            </div>
        </div>
    </div>
    <div class="layui-col-xs8">
        <textarea id="result" name="" class="layui-textarea"></textarea>
    </div>
    <div class="layui-col-xs2">
        <button id="btn_send" type="button" class="layui-btn send">
            <i class="layui-icon layui-icon-right" style="font-size: 20px; color: #fff;"></i>发送AI
        </button>
    </div>
</div>
<script src="./js/layui/layui.js"></script>
<script src="./js/xfyun/crypto-js.js"></script>
<script src="./js/xfyun/index.umd.js"></script>
<script src="js/common.js"></script>
<script src="./js/index.js"></script>
</body>
</html>
